<%= form_for(admin_plugins_attack_settings_path, html:{ id: "attack_form", class: "validate" }) do %>
    <div class="panel panel-default">

        <div class="panel-heading">
            <h3 class="panel-title"> <%= t('plugin.attack.attack_security') %></h3>
        </div>
        <div class="panel-body">
            <div class="form-group">
                <div class="input-group">
                    <span class="input-group-addon"><%= t('plugin.attack.form.type_max_requests_time', type: 'GET') %> </span>
                    <%= text_field_tag("attack[get_max]", @attack[:get][:max], class: "required number form-control") %>
                    <span class="input-group-addon" style="border-left: 0; border-right: 0;"><%= t('plugin.attack.form.in') %></span>
                    <%= text_field_tag("attack[get_sec]", @attack[:get][:sec], class: "required number form-control") %>
                    <span class="input-group-addon"> <%= t('plugin.attack.form.seconds') %> </span>
                </div>
            </div>

            <div class="form-group">
                <div class="input-group">
                    <span class="input-group-addon"><%= t('plugin.attack.form.type_max_requests_time', type: 'POST') %> </span>
                    <%= text_field_tag("attack[post_max]", @attack[:post][:max], class: "required number form-control") %>
                    <span class="input-group-addon" style="border-left: 0; border-right: 0;"><%= t('plugin.attack.form.in') %></span>
                    <%= text_field_tag("attack[post_sec]", @attack[:post][:sec], class: "required number form-control") %>
                    <span class="input-group-addon"> <%= t('plugin.attack.form.seconds') %> </span>
                </div>
            </div>
            <hr>

            <div class="form-group">
                <div class="input-group">
                    <span class="input-group-addon"><%= t('plugin.attack.form.ban_time_minutes') %> </span>
                    <%= text_field_tag("attack[ban]", @attack[:ban], class: "required number form-control") %>
                    <span class="input-group-addon" style="border-left: 0; border-right: 0;"><%= t('plugin.attack.form.minutes') %></span>
                </div>

            </div>

            <div class="form-group">
                <label><%= t('plugin.attack.form.ban_messages') %></label><br>
                <%= text_field_tag("attack[msg]", @attack[:msg], class: "form-control") %>
            </div>
        </div>
        <div class="panel-footer">
            <a class="btn btn-default" href="<%= url_for zerocms_admin_plugins_path %>"><%= t('zerocms.admin.button.back') %></a>
            <button class="btn btn-primary pull-right" type="submit"><%= t('zerocms.admin.button.submit') %></button>
        </div>
    </div>

<% end %>
